package com.user.entity;

import java.util.Objects;

public class Users {
    int id;
    String username;
    String password;
    int shoolid;
    String schoolname;

    @Override
    public String toString() {
        return "Users{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", shoolid=" + shoolid +
                ", schoolname='" + schoolname + '\'' +
                '}';
    }

    public Users(int id, String username, String password, int shoolid, String schoolname) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.shoolid = shoolid;
        this.schoolname = schoolname;
    }

    public Users(int id, String username, String password, String schoolname) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.schoolname = schoolname;
    }

    public Users(int id) {
        this.id = id;
    }

    public Users(String username, String password, int shoolid) {
        this.username = username;
        this.password = password;
        this.shoolid = shoolid;
    }

    public Users(String username, String password) {
        this.username = username;
        this.password = password;
    }


    public Users() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getShoolid() {
        return shoolid;
    }

    public void setShoolid(int shoolid) {
        this.shoolid = shoolid;
    }

    public String getSchoolname() {
        return schoolname;
    }

    public void setSchoolname(String schoolname) {
        this.schoolname = schoolname;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Users users = (Users) o;
        return id == users.id && shoolid == users.shoolid && Objects.equals(username, users.username) && Objects.equals(password, users.password);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, username, password, shoolid);
    }

}
